'use strict';

const Controller = require('egg').Controller;

class DetailController extends Controller {
  async index() {
    const {ctx} = this;
   var {id} = ctx.query;
   const res = await ctx.service.movie.getMovieDetail(id)
   console.log(res);
   if(res.length){
    ctx.body={
        msg:"电影详情",
        res
    }
   }else{
    ctx.status = 400;
    ctx.body={
        status:400,
        msg:"输入的api参数不合法"
    }
}
   
  }
}

module.exports = DetailController;
